package com.iplant.wms.service;

import com.iplant.base.po.Pagination;
import com.iplant.base.po.ServiceResult;
import com.iplant.basic.service.po.bms.BMSEmployee;
import com.iplant.wms.service.po.batch.MSSBatchProp;
import com.iplant.wms.service.po.batch.MSSBatchRange;
import com.iplant.wms.service.po.batch.MSSBatchRecord;
import com.iplant.wms.service.po.batch.MSSBatchRule;
import com.iplant.wms.service.po.mss.*;
import com.iplant.wms.service.po.pkg.*;
import java.util.Calendar;
import java.util.List;

public interface SMSSService {
    // 单位&包装

    // 单位

    // 单位换算

    ServiceResult<Integer> MSS_UpdateMeasureUnit(BMSEmployee wLoginUser, MSSMeasureUnit wMeasureUnit);

    ServiceResult<Integer> MSS_DeleteMeasureUnit(BMSEmployee wLoginUser, MSSMeasureUnit wMeasureUnit);

    ServiceResult<Integer> MSS_ActiveMeasureUnit(BMSEmployee wLoginUser, MSSMeasureUnit wMeasureUnit, int wActive);

    ServiceResult<MSSMeasureUnit> MSS_QueryMeasureUnit(BMSEmployee wLoginUser, int wMeasureUnitID, int wSourceUnitID);

    ServiceResult<List<MSSMeasureUnit>> MSS_QueryMeasureUnitList(BMSEmployee wLoginUser, List<Integer> wMeasureUnitID,
                                                                 List<Integer> wSourceUnitID, int wActive, Pagination wPagination);

    // 包装

//	ServiceResult<Integer> MSS_AddPackage(BMSEmployee  wLoginUser, MSSPackage wPackage);
//
//	
//	ServiceResult<Integer> MSS_SavePackage(BMSEmployee  wLoginUser, MSSPackage wPackage);
//
//	
//	ServiceResult<Integer> MSS_ActivePackageByID(BMSEmployee  wLoginUser, int wID);
//
//	
//	ServiceResult<Integer> MSS_DisablePackageByID(BMSEmployee  wLoginUser, int wID);
//
//	
//	ServiceResult<List<MSSPackage>> MSS_QueryPackageList(BMSEmployee  wLoginUser, String wMaterialNo);
//
//	
//	ServiceResult<MSSPackage> MSS_QueryPackageByID(BMSEmployee  wLoginUser, int wID);

    //批次管理




    //批次模板

    ServiceResult<Integer> MSS_DeleteBatchRule(BMSEmployee wLoginUser, MSSBatchRule wBatchRule);


    ServiceResult<List<MSSBatchRule>> MSS_QueryBatchRuleList(
            BMSEmployee wLoginUser,   String wName,
            int wActive,
            Pagination wPagination);

    //批次属性
    ServiceResult<Integer> MSS_UpdateBatchProp(BMSEmployee wLoginUser, MSSBatchProp wBatchProp);

    ServiceResult<List<MSSBatchProp>> MSS_QueryBatchPropList(BMSEmployee wLoginUser, int wRuleID,String wRuleCode);



    ServiceResult<MSSBatchRange> MSS_QueryBatchRange(
            BMSEmployee wLoginUser, int wCustomerID, String wMaterialNo);

    ServiceResult<List<MSSBatchRange>> MSS_QueryBatchRangeList(
            BMSEmployee wLoginUser,int wCustomerID,  String  wMaterialGroupFullName,
            int wMaterialID,  Pagination wPagination);


    //批次管理


    //周转规则
    ServiceResult<Integer> MSS_UpdateTransferRule(BMSEmployee wLoginUser, MSSTransferRule wTransferRule);

    ServiceResult<Integer> MSS_DeleteTransferRule(BMSEmployee wLoginUser, MSSTransferRule wTransferRule);

    ServiceResult<Integer> MSS_ActiveTransferRule(
            BMSEmployee wLoginUser, MSSTransferRule wTransferRule, int wActive);

    ServiceResult<MSSTransferRule> MSS_QueryTransferRule(BMSEmployee wLoginUser, int wID, String wCode);

    ServiceResult<List<MSSTransferRule>> MSS_QueryTransferRuleList(
            BMSEmployee wLoginUser, String wName, int wBatchRuleID, String wBatchRuleCode, int wActive,
            Pagination wPagination);

    //批次属性
    ServiceResult<Integer> MSS_UpdateTransferProp(BMSEmployee wLoginUser, MSSTransferProp wTransferProp);

    ServiceResult<List<MSSTransferProp>> MSS_QueryTransferPropList(
            BMSEmployee wLoginUser, int wRuleID, String wRuleCode, int wBatchRuleID, String wBatchRuleCode,
            int wBatchPropID, String wBatchPropCode, String wName, String wCode, List<Integer> wActive,
            Pagination wPagination);

    ServiceResult<Integer> MSS_ActiveTransferProp(
            BMSEmployee wLoginUser, MSSTransferProp wTransferProp, int wActive);

    ServiceResult<Integer> MSS_UpdateTransferRange(BMSEmployee wLoginUser, MSSTransferRange wTransferRange);

    ServiceResult<Integer> MSS_DeleteTransferRange(BMSEmployee wLoginUser, MSSTransferRange wTransferRange);

    ServiceResult<MSSTransferRange> MSS_QueryTransferRange(
            BMSEmployee wLoginUser, int wCustomerID, String wMaterialNo);

    ServiceResult<List<MSSTransferRange>> MSS_QueryTransferRangeList(
            BMSEmployee wLoginUser, int wCustomerID, List<Integer> wCustomerIDList, int wMaterialGroupID,
            String wMaterialGroupFullName, int wMaterialID, List<String> wMaterialCode, String wMaterialLike,
            Pagination wPagination);

    //批次模板
    ServiceResult<Integer> MSS_UpdatePackageRule(BMSEmployee wLoginUser, MSSPackageRule wPackageRule);

    ServiceResult<Integer> MSS_DeletePackageRule(BMSEmployee wLoginUser, MSSPackageRule wPackageRule);

    ServiceResult<Integer> MSS_ActivePackageRule(BMSEmployee wLoginUser, MSSPackageRule wPackageRule, int wActive);

    ServiceResult<MSSPackageRule> MSS_QueryPackageRule(BMSEmployee wLoginUser, int wID, String wCode);

    ServiceResult<List<MSSPackageRule>> MSS_QueryPackageRuleList(
            BMSEmployee wLoginUser,   String wName,
            int wActive,
            Pagination wPagination);

    //批次属性
    ServiceResult<Integer> MSS_UpdatePackageProp(BMSEmployee wLoginUser, MSSPackageProp wPackageProp);

    ServiceResult<List<MSSPackageProp>> MSS_QueryPackagePropList(BMSEmployee wLoginUser, int wRuleID,String wRuleCode);

    ServiceResult<Integer> MSS_ActivePackageProp(BMSEmployee wLoginUser, MSSPackageProp wPackageProp, int wActive);

    ServiceResult<List<MSSPackageProp>> MSS_QueryPackagePropList(BMSEmployee wLoginUser, int wRuleID,String wRuleCode, String wName, String wCode,
                                                             List<Integer> wActive, Pagination wPagination);

    ServiceResult<Integer> MSS_UpdatePackageRange(BMSEmployee wLoginUser, MSSPackageRange wPackageRange);
    ServiceResult<Integer> MSS_DeletePackageRange(BMSEmployee wLoginUser, MSSPackageRange wPackageRange);

    ServiceResult<List<MSSPackageRange>> MSS_QueryPackageRangeList(
            BMSEmployee wLoginUser,int wCustomerID,  List<Integer> wCustomerIDList,int wMaterialGroupID,String wMaterialGroupFullName,
            int wMaterialID, List<String> wMaterialCode, String wMaterialLike,    Pagination wPagination);
    
    // 物料管理

    // 物料类型

    ServiceResult<MSSPackageRange> MSS_QueryPackageRange(
            BMSEmployee wLoginUser, int wCustomerID, String wMaterialNo);



    ServiceResult<Integer> MSS_UpdateMaterialStation(BMSEmployee wLoginUser, MSSMaterialStation wMaterialStation);

    ServiceResult<Integer> MSS_UpdateMaterialStationList(BMSEmployee wLoginUser,
                                                         List<MSSMaterialStation> wMaterialStation);

    ServiceResult<Integer> MSS_DeleteMaterialStation(BMSEmployee wLoginUser, MSSMaterialStation wMaterialStation);





    // 容器类型

    ServiceResult<Integer> MSS_UpdateContainerType(BMSEmployee wLoginUser, MSSContainerType wContainerType);

    ServiceResult<Integer> MSS_DeleteContainerType(BMSEmployee wLoginUser, MSSContainerType wContainerType);

    ServiceResult<Integer> MSS_ActiveContainerType(BMSEmployee wLoginUser, MSSContainerType wContainerType,
                                                   int wActive);

    ServiceResult<MSSContainerType> MSS_QueryContainerType(BMSEmployee wLoginUser, int wID, String wCode);

    ServiceResult<List<MSSContainerType>> MSS_QueryContainerTypeList(BMSEmployee wLoginUser, String wName, int wActive,
                                                                     Pagination wPagination);

    // 容器

    ServiceResult<Integer> MSS_UpdateContainer(BMSEmployee wLoginUser, MSSContainer wContainer);

    ServiceResult<Integer> MSS_DeleteContainer(BMSEmployee wLoginUser, MSSContainer wContainer);

    ServiceResult<Integer> MSS_ActiveContainer(BMSEmployee wLoginUser, MSSContainer wContainer, int wActive);

    ServiceResult<MSSContainer> MSS_QueryContainer(BMSEmployee wLoginUser, int wID, String wCode);

    ServiceResult<List<MSSContainer>> MSS_QueryContainerList(BMSEmployee wLoginUser, int wTypeID, String wName,
                                                             String wTypeCode, String wTypeName, int wActive, Pagination wPagination);

    ServiceResult<List<String>> WMS_CreateQRCodeList(BMSEmployee wLoginUser, List<String> wStringList);
}
